home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 56804 / 56804.xpi / chrome / content / alexaLicense.js < prev    next >
Text File  |  2010-01-31  |  828b  |  30 lines

  1. if(!com) var com={};
  2. if(!com.seostatus) com.seostatus={};
  3.  
  4. com.seostatus.alexaLicense = function(){  
  5.   var pub = {};
  6.   pub.pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
  7.       
  8.   pub.stb_set_agreement_settings = function()
  9.   {
  10.       var branch = pref.getBranch("seostatus.");
  11.           try 
  12.           {
  13.               document.getElementById("Alexa_Agree").checked = branch.getBoolPref("stb_alexa_agree");
  14.           }
  15.           catch(e)
  16.           {
  17.             document.getElementById("Y-Agree").checked = false;
  18.           }
  19.     }
  20.   
  21.   pub.stb_save_agreement_settings = function()
  22.   {
  23.       var branch = pub.pref.getBranch("seostatus.");
  24.         try{
  25.           branch.setBoolPref("stb_alexa_agree", document.getElementById("Alexa_Agree").checked);
  26.         }
  27.     catch(e){}
  28.   }
  29.   return pub;
  30. }();